package com.sxf.domain.blog;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * 全站点的配置(通用)
 * 
 * @author SXF
 * 
 */
@Entity
@Table(name = "wp_options")
@DynamicInsert
@DynamicUpdate
public class Option implements Serializable {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@Column(name = "blog_id", nullable = false)
	private Integer blogId;

	@Column(length = 64, nullable = false, unique = true)
	private String name;

	@Column(length = 20, nullable = false)
	private String autoload;

	@Lob
	@Column(columnDefinition = "clob", nullable = false)
	private String value;

	private static final long serialVersionUID = 1L;

	public Option() {

	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getBlogId() {
		return blogId;
	}

	public void setBlogId(Integer blogId) {
		this.blogId = blogId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAutoload() {
		return autoload;
	}

	public void setAutoload(String autoload) {
		this.autoload = autoload;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

}
